<template>
	<view  style="justify-content: center;
  align-items: center;"> 
		<view class="gotoIndex"  @click="gotoIndex">即刻了解</view>
		<firstVideo :p-config="config"/>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapMutations
	} from 'vuex';
		import firstVideo from "@/components/videos/firstVideo.vue"
		export default {
			components:{firstVideo},
			onShareAppMessage() {
				let url = '/pages/index/first'
				this.shareSend()
				return {
					title: this.config.share_title,
					imageUrl: this.config.share_image,
					path: url
				}
			},
			onShareTimeline(){
				this.shareSend()
				return {
					title: this.config.share_title,
					imageUrl: this.config.share_image,
				}
			},
			computed: {
				...mapGetters({
					config: 'user/meetConfig', 
				})
			},
			methods:{
				gotoIndex(){
					uni.switchTab({url:"/pages/index/index"})
				},
				shareSend() {
					let _this = this
					_this.$api.get('meet.user/share', {}).then(res => {}, fail => {})
				}
			},
			mounted() {
				if(this.config.first_video[0].status==0){
					this.gotoIndex()
				}
				
			}
		}
</script>

<style scoped>
	.gotoIndex{
		display: block;
		margin: 0 auto;
		height: 70rpx;
		line-height: 70rpx;
		padding: 5rpx 50rpx;
		font-size: 30rpx;
		position: absolute;
		left: 50%;
		transform: translateX(-50%); /* 向左移动自身宽度的50% */
		z-index: 99;
		color: white;
		bottom:300rpx;
		font-weight: 20;
		text-align: center;
		border: 1px solid white;
		border-radius: 100rpx;
		background: rgba(255,255,255,0.1);
	}
</style>